from rest_framework import serializers
import tsl_backend.users.models as users

class UpdatePWDSerializer(serializers.Serializer):
    oldPWD = serializers.CharField(max_length=20)
    newPWD = serializers.CharField(max_length=20)
    staffcode = serializers.CharField(max_length=20)

class RolePermissionSerializer(serializers.ModelSerializer):
    
    class Meta:
        model = users.RolePermission
        fields = ["menu_massscan_perm", "menu_orderview_perm", "menu_printlabel_perm",
                   "report_worker_storage_perm", "report_worker_transaction_perm", "report_worker_handover_perm", 
                  "report_worker_handset_perm", "report_qc_handset_perm", 
                  "report_qc_transaction_perm",
                  "report_printstatus_perm", "report_leadtime_perm", "menu_updatert_perm"]
        
    
